package com.xoa.controller.party;


import com.xoa.model.party.HighPoint;
import com.xoa.service.party.HIghPointService;
import com.xoa.util.common.wrapper.BaseWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by 程叶同 on 2018/1/6.
 */
@Controller
@RequestMapping("highpoint")
public class HighPointController {
    @Autowired
    HIghPointService hIghPointService;

    @RequestMapping("/addHighPoint")
    @ResponseBody
    public BaseWrapper addHighPoint(HttpServletRequest request, HighPoint highPoint){
        return hIghPointService.addHighpoint(highPoint);
    }

    @RequestMapping("/deleteHighpoint")
    @ResponseBody
    public BaseWrapper deleteHighpoint(HttpServletRequest request, Integer id){
        return hIghPointService.deleteHighpoint(request,id);
    }
    @RequestMapping("/getHighPointList")
    @ResponseBody
    public BaseWrapper getHighPointList(HttpServletRequest request, Integer page, Integer pageSize, boolean useFlag, String subcounty){
        return hIghPointService.getHighPointList(request,page,pageSize,useFlag,subcounty);
    }
    @RequestMapping("/updateHighPoint")
    @ResponseBody
    public BaseWrapper updateHighPoint(HttpServletRequest request, HighPoint highPoint){
        return hIghPointService.updateHighPoint(request,highPoint);
    }
    @RequestMapping("/getHighPointById")
    @ResponseBody
    public BaseWrapper getHighPointById(HttpServletRequest request, Integer id){
        return hIghPointService.getHighPointById(id);
    }

    @RequestMapping("/getOutFile")
    @ResponseBody
    public BaseWrapper getOutFile(HttpServletRequest request, HttpServletResponse response, String ids){
        return hIghPointService.fileOut(request,response,ids);
    }
}
